#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>



/* signal SIGUSR1 handler */
void killServer(int sigNum)
{
  exit(0);
}


int main()
{
  pid_t pid = 0;
  
  pid = fork();

  if (pid > 0)
  {
    //client();
    kill(pid, SIGUSR1);
  }
  else if (pid == 0)
  {
    signal(SIGUSR1, killServer);
    //server();
  }
  else
  {
    printf("fork() error! quit...\n");
  }
}


